---
title: Generate Java models in an existing project
description: Retrain legacy models for which you want to download Scoring Code.

---

# Generate Java models in an existing project {: #generate-java-models-in-an-existing-project }

If you have projects that were created before the Scoring Code feature was enabled for your organization, you must retrain the models for which you want to download code. You do not need to recreate the entire project.

To retrain a model:

1. Click the checkbox at the left of the model to select it. Note the blueprint number (BPxx) as you will need this information later.

2. From the dropdown menu, select **Delete**.

    ![](images/scorecode-2.png)

3. Open the [**Repository**](repository) and search for a model with same blueprint number. Check the box to the left of the model to select it.

4. Set the [values](repository#create-a-new-model) and click the **Run task(s)** button.

5. When the model has finished training, return to the Leaderboard and enter the blueprint number in the search field.

6. Expand the model version with the SCORING CODE ![](images/icon-scorecode.png) tag, navigate to **Predict > Downloads**, select a download option, and click **Download** to access the scoring code.

!!! note
    A retrained model may have slightly different predictions than the original model due to the nature of the parameter initialization process used by machine learning algorithms.
